package com.jl.jlapp.adapter;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jl.jlapp.R;
import com.jl.jlapp.eneity.OrderStateDetailModel;

import java.text.SimpleDateFormat;
import java.util.List;

public class TracingListAdapter
  extends BaseQuickAdapter<OrderStateDetailModel.ResultDataBean, BaseViewHolder>
{
  int length;
  
  public TracingListAdapter(@LayoutRes int paramInt, @Nullable List<OrderStateDetailModel.ResultDataBean> paramList)
  {
    super(paramInt, paramList);
    this.length = paramList.size();
  }
  
  protected void convert(BaseViewHolder paramBaseViewHolder, OrderStateDetailModel.ResultDataBean paramResultDataBean)
  {
    TextView localTextView1 = (TextView)paramBaseViewHolder.getView(R.id.start_line);
    ImageView localImageView = (ImageView)paramBaseViewHolder.getView(R.id.icon);
    TextView localTextView2 = (TextView)paramBaseViewHolder.getView(R.id.end_line);
    TextView localTextView3 = (TextView)paramBaseViewHolder.getView(R.id.state);
    paramBaseViewHolder.setText(R.id.state, paramResultDataBean.getOrderStateDetail());
    long l = paramResultDataBean.getAddTime();
    paramBaseViewHolder.setText(R.id.time, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Long.valueOf(l)));
    if (paramBaseViewHolder.getLayoutPosition() == 0)
    {
      localImageView.setImageDrawable(paramBaseViewHolder.itemView.getResources().getDrawable(R.drawable.icon_point_green));
      localTextView1.setVisibility(View.INVISIBLE);
      localTextView3.setTextColor(paramBaseViewHolder.itemView.getResources().getColor(R.color.checkGreenColor));
    }
    while (paramBaseViewHolder.getLayoutPosition() != this.length - 1) {
      return;
    }
    localTextView2.setVisibility(View.INVISIBLE);
  }
}


/* Location:              /Users/davidzhang/Documents/decompileApk/jlfood-dex2jar.jar!/com/jl/jlapp/adapter/TracingListAdapter.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */